<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <style media="screen">
        html,
        body {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            color:#101010;
        }

        body {
            background: url('./img/backg.jpg') no-repeat;
            background-size: 200% 100%;
            text-align: center;
            overflow: hidden;
        }

        #success,#error,#noName {
            margin-top: 150px;
            font-size: 1.2rem;
            font-family: FangSong;
            display: none;
            color:#fff;
        }
    </style>
</head>

<body>
    <div id="success">
        签到成功！
    </div>
    <div id="noName">
      参与抽奖失败！请先填写微信昵称~
    </div>
    <div id="error">
      参与抽奖失败！获取不到您的微信信息~
    </div>
    <script type="text/javascript">
        function GetRequest() {
            var url = location.search; //获取url中"?"符后的字串
            var theRequest = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                strs = str.split("&");
                for (var i = 0; i < strs.length; i++) {
                    theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                }
            }
            return theRequest;
        }
        var paraObj = GetRequest();
        if(paraObj.errorCode == 201) {
          document.getElementById('noName').style.display = "block";
        }else if(paraObj.errorCode == 202){
          document.getElementById('error').style.display = "block";
        }else {
          document.getElementById('success').style.display = "block";
        }
    </script>
</body>

</html>
